import axios from 'axios';

const service = axios.create({
  baseURL: '//api-passport.miva.work',
  timeout: 15000 * 999,
  validateStatus: (status) => status < 600,
});

// 请求拦截器
service.interceptors.request.use(
  (config) => config,
  (error) => Promise.reject(error),
);

// 响应拦截器
service.interceptors.response.use(
  (response) => {
    const { data } = response;
    return data;
  }, (error) => Promise.reject(error),
);
export default service;
